<template>
  <el-select
    filterable
    clearable
    v-bind="$attrs"
    v-on="$listeners"
  >
    <el-option
      v-for="(row,idx) in options"
      :key="idx"
      :value="row[optionsConfig['value']]"
      :label="row[optionsConfig['label']]"
      :disabled="row[optionsConfig['disabled']]"
    />
  </el-select>
</template>

<script>
export default {
  name: 'BhsSelect',
  props: {
    optionsConfig: {
      required: false,
      type: Object,
      default: () => ({ value: 'value', label: 'label', disabled: 'disabled' })
    },
    options: {
      required: true,
      type: Array
    }
  }

}
</script>

<style>

</style>
